package com.cjgl.model.enums;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public enum LengthTypeEnum {
	YEAR_LENGTH("year_length", 4),
	MONTH_LENGTH("month_length", 2),
	DAY_LENGTH("day_length", 2);

	private final String type;

	private final int value;

	LengthTypeEnum(String type, int value) {
		this.type = type;
		this.value = value;
	}

	public static List<Integer> getValues() {
		return Arrays.stream(values()).map(item -> item.value).collect(Collectors.toList());
	}

	public String getType() {
		return type;
	}

	public int getValue() {
		return value;
	}
}
